<me:UIGBMOV x:Class="WPFExcelReport.TCPGBMOV"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                     x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIGBMOV.Resources>
        <CollectionViewSource  x:Key="vwMaster" />
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TRIMGB2312Convert8859P1 x:Key="tugb"/>
    </me:UIGBMOV.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0">
            <WrapPanel Height="34">
                <Label Content="{Binding Source={Localization:Translate Word=库}}"    Width="Auto" Margin="1,0,0,0"   FontSize="18"  Foreground="#FF141111" />
                <TextBox Text="{Binding LO,ElementName=TV}"  Width="39" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink"  
                         CharacterCasing="Upper" MaxLength="20"  FontSize="18"   Foreground="#FF141111" />
                <Label Content="{Binding Source={Localization:Translate Word=库区}}"    Width="Auto" Margin="1,0,0,0"     FontSize="18"  Foreground="#FF141111" />
                <TextBox Text="{Binding LB,ElementName=TV}" Width="41" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink"  
                         CharacterCasing="Upper" MaxLength="20" FontSize="18"   Foreground="#FF141111" />
                <Label Width="Auto"  VerticalAlignment="Center" Content="{Binding Source={Localization:Translate Word=批号}}" FontSize="18" />
                <TextBox Text="" Name="txtART" Width="147" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink"  
                         CharacterCasing="Upper" MaxLength="20" FontSize="18"   Foreground="#FF141111" />
                <Label Content="{Binding Source={Localization:Translate Word=日期从}}"   HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"  Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0"  FontSize="16"   Panel.ZIndex="4" 
                            Text="{Binding FROMDATE,ElementName=TV}" SelectedDateChanged ="FROM_DATE_SelectedDateChanged"  />
                <Label Content="{Binding Source={Localization:Translate Word=到}}" Height="28" HorizontalAlignment="Left" Margin="10,0,0,0"   Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,0,0,0"   VerticalAlignment="Center" FontSize="16"  Panel.ZIndex="5"
                                  Text="{Binding ENDDATE,ElementName=TV}"    SelectedDateChanged ="END_DATE_SelectedDateChanged"   />
                <Button Content="{Binding Source={Localization:Translate Word=查询}}" Height="33" Margin="10,0,0,0" FontSize="18"  Width="96" Panel.ZIndex="9"
                        Click="QueryCommand"/>
                <Button Content="{Binding Source={Localization:Translate Word=导出}}" Height="33" Margin="10,0,0,0" FontSize="18"  Width="100" Panel.ZIndex="10"
                    Click="PrintCommand"   />
            </WrapPanel>
        </StackPanel>
        <Grid Grid.Row="1" Grid.Column="0">   
        <DataGrid  VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"
                   Name="dlgMaster"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                    >
            <DataGrid.Columns>
                    <!--GLPARTIE	GLLO	GLLB	GPGART	GPGFARBE	GPSPPART	GPFBPART	PACKING	GPEINDAT	GPBEM1	GPBEM2	
                INKG	INKA	MUIKG	MUIKA	STIKG	STIKA	SOIKG	SOIKA	MUOKG	MUOKA	SMOKG	
                SMOKA	STOKG	STOKA	SOOKG	SOOKA	OUTKG	OUTKA-->
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=入库号}}" Binding="{Binding GLPARTIE}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=库}}" Binding="{Binding GLLO}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=区}}" Binding="{Binding GLLB}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=纱线编号}}" Binding="{Binding GPGART,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=色号}}" Binding="{Binding GPGFARBE,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=纺批}}" Binding="{Binding GPSPPART,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=缸号}}" Binding="{Binding GPFBPART,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=打包方式}}" Binding="{Binding PACKING,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=最早入库日期}}" Binding="{Binding GPEINDAT}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=期初KG}}" Binding="{Binding INKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=期初包数}}" Binding="{Binding INKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=手工入KG}}" Binding="{Binding MUIKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=手工入包数}}" Binding="{Binding MUIKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=车间转入KG}}" Binding="{Binding STIKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=车间转入包数}}" Binding="{Binding STIKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=外库转入KG}}" Binding="{Binding EXIKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=外库转入包数}}" Binding="{Binding EXIKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=销售退KG}}" Binding="{Binding SOIKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=销售退包数}}" Binding="{Binding SOIKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=手调整KG}}" Binding="{Binding MUOKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=手调整包数}}" Binding="{Binding MUOKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=免费样纱KG}}" Binding="{Binding SMOKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=免费样纱包数}}" Binding="{Binding SMOKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=发生产KG}}" Binding="{Binding STOKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=发生产包数}}" Binding="{Binding STOKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=转外厂KG}}" Binding="{Binding EXOKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=转外厂包数}}" Binding="{Binding EXOKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=销售出KG}}" Binding="{Binding SOOKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=销售出包数}}" Binding="{Binding SOOKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=期末KG}}" Binding="{Binding OUTKG}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=期末包数}}" Binding="{Binding OUTKA}" Width="Auto"/>
                    <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=备注}}" Binding="{Binding REMARK,Converter={StaticResource ResourceKey=tugb }}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid>
        </Grid>
        <ex:TPage  Grid.Row="2" Visibility="{Binding IsPage,Converter={StaticResource bv}}"/>
    </Grid>
</me:UIGBMOV> 
 
